
import { legacy_createStore as createStore, combineReducers, applyMiddleware, compose } from 'redux';

// 导入shopReducer 和 userReducer
import shopReducer from './reducers/shopReducer';
import userReducer from './reducers/userReducer';

// 导入redux-thunk 
import reduxthunk from 'redux-thunk';

// 定义store
const composeEnhancers = window.__REDUX_DEVTOOLS_EXTENSION_COMPOSE__ || compose;
const store = createStore(
    combineReducers({
        shopReducer,
        userReducer
    }), composeEnhancers(
        applyMiddleware(reduxthunk)
    ));

export default store
